package com.example.lottery.dao.mapper;

import com.example.lottery.dao.dataobject.Encrypt;
import com.example.lottery.dao.dataobject.UserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    int insert(UserDO row);

    int insertSelective(UserDO row);

    UserDO selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserDO row);

    int updateByPrimaryKey(UserDO row);

    UserDO selectByEmail(@Param("email") String email);

    int selectByPhoneNumberCount(@Param("phoneNumber") Encrypt phoneNumber);

    UserDO selectByPhoneNumber(@Param("phoneNumber") Encrypt phoneNumber);

    List<UserDO> selectUsersBaseInfo(@Param("identity") String identity);

    List<Long> selectByuserIds(@Param("userIds") List<Long> userIds);

    String selectEmailById(@Param("id") Long id);

    Encrypt selectPhoneById(@Param("id") Long id);

}